package io.wins.vertx.service;

import io.vertx.core.Vertx;
import io.vertx.core.eventbus.Message;
import io.wins.vertx.entity.Purchase;
import io.wins.vertx.service.impl.PurchaseServiceImpl;

public interface PurchaseService {

    String SERVICE_ADDRESS = "purchase.service";
    static PurchaseService create(final Vertx vertx) {return new PurchaseServiceImpl(vertx);}

    PurchaseService getPurchase(final String id, final Message tMessage);
    PurchaseService delPurchase(final String id, final Message tMessage);
    PurchaseService listPurchase(final String status, final Message tMessage);
    PurchaseService listPurchaseByCust(final String customerId, final int status, final Message tMessage);
    PurchaseService savePurchase(final Purchase p, final Message tMessage);
    PurchaseService createPurchase(final Purchase p, final Message tMessage);
    PurchaseService updateStatus(final String id , final String status, final Message tMessage);
}
